package com.itttq.gen.generator.to;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

@Builder
@Data
public class ColumnTo implements Comparable<ColumnTo>, Serializable {
    private static final long serialVersionUID = -962358510373009043L;
    /**
     * 字段数据的java类型
     */
    private String javaType;
    /**
     * 是否自增
     */
    private String autoincrement;
    /**
     * Java字段名
     */
    private String fieldName;
    /**
     * 字段名
     */
    private String column;
    /**
     * 备注
     */
    private String remark;

    @Override
    public int compareTo(ColumnTo o) {
        if (o == null) {
            return 1;
        }
        return this.getColumn().compareTo(o.getColumn());
    }
}
